<template>
  <div class="header">
    <van-nav-bar
      class="title"
      :title="title"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
  </div>
</template>
<script>
export default {
  data() {
    return {
      title: this.$route.meta.title,
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
  },
};
</script>
<style lang="scss" scoped>
.header {
  .title {
    position: fixed;
    width: 100%;
    top: 0;
  }
}
</style>
